home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’92 / NetWarmer / source / Dispatcher.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-22  |  2.3 KB  |  135 lines  |  [TEXT/KAHL]

  1. /* Dispatcher.c -- dispatcher for windows and for modeless dialogs */
  2. /* Created 3/13/4 1:08 PM by AppMaker */
  3.  
  4. #include "MainWindow.h"
  5.  
  6. #include "Globals.h"
  7.  
  8. #include "Dispatcher.h"
  9.  
  10. /*----------*/
  11. void OpenWindows (fName, vRefNum, fRefNum)
  12. Str255            fName;
  13. short            vRefNum;
  14. short            fRefNum;
  15. {
  16.     OpenMainWindow (fName, vRefNum, fRefNum);
  17.     } /*OpenWindows*/
  18.  
  19. /*----------*/
  20. void CloseCurWindow ()
  21. {
  22.     switch (cur->windowKind) {
  23.     case WMainWindow:
  24.             CloseMainWindow ();
  25.         break;
  26.         } /*switch*/
  27. } /*CloseCurWindow*/
  28.  
  29. /*----------*/
  30. void MouseInContent (where, modifiers)
  31. Point            where;
  32. short            modifiers;
  33. {
  34.     switch (cur->windowKind) {
  35.     case WMainWindow:
  36.             MouseInMainWindow (where, modifiers);
  37.         break;
  38.         } /*case*/
  39. } /*MouseInContent*/
  40.  
  41. /*----------*/
  42. void TypeInWindow (ch)
  43. char            ch;
  44. {
  45.     switch (cur->windowKind) {
  46.     case WMainWindow:
  47.             TypeInMainWindow (ch);
  48.         break;
  49.         } /*case*/
  50. } /*TypeInWindow*/
  51.  
  52. /*----------*/
  53. void UpdateContent ()
  54. {
  55.     switch (cur->windowKind) {
  56.     case WMainWindow:
  57.             UpdateMainWindow ();
  58.         break;
  59.         } /*case*/
  60. } /*UpdateContent*/
  61.  
  62. /*----------*/
  63. void ActivateContent (activate)
  64. Boolean            activate;
  65. {
  66.     switch (cur->windowKind) {
  67.     case WMainWindow:
  68.             ActivateMainWindow (activate);
  69.         break;
  70.         } /*case*/
  71. } /*ActivateContent*/
  72.  
  73. /*----------*/
  74. void ResizeContent ()
  75. {
  76.     switch (cur->windowKind) {
  77.     case WMainWindow:
  78.             ResizeMainWindow ();
  79.         break;
  80.         } /*case*/
  81. } /*ResizeContent*/
  82.  
  83. /*----------*/
  84. pascal void ScrollWindow (newValue, oldValue)
  85. short            newValue;
  86. short            oldValue;
  87. {
  88.     switch (cur->windowKind) {
  89.     case WMainWindow:
  90.             ScrollMainWindow (newValue, oldValue);
  91.         break;
  92.         } /*case*/
  93. } /*ScrollWindow*/
  94.  
  95. /*----------*/
  96. void DoControl (whichControl, whichPart, where)
  97. ControlHandle    whichControl;
  98. short            whichPart;
  99. Point            where;
  100. {
  101.     switch (cur->windowKind) {
  102.     case WMainWindow:
  103.             ControlMainWindow (whichControl, whichPart, where);
  104.         break;
  105.     } /*case*/
  106. } /*DoControl*/
  107.  
  108. /*----------*/
  109. void InitModelessDialogs ()
  110. {
  111.     } /*InitModelessDialogs*/
  112.  
  113. /*----------*/
  114. void CloseModelessDialog (whichDialog)
  115. DialogPtr        whichDialog;
  116. {
  117.     } /*CloseModelessDialog*/
  118.  
  119. /*----------*/
  120. Boolean FilterModeless (whichDialog, event, itemHit)
  121. DialogPtr        whichDialog;
  122. EventRecord        *event;
  123. short            *itemHit;
  124. {
  125.         return (false);
  126. } /*FilterModeless*/
  127.  
  128. /*----------*/
  129. void DoModelessItem (whichDialog, itemNr)
  130. DialogPtr        whichDialog;
  131. short            itemNr;
  132. {
  133.     } /*DoModelessItem*/
  134.  
  135. /* Dispatcher */